import request from '@/utils/request'

// 查询房间订单列表
export function listRoomorder(query) {
  return request({
    url: '/system/roomorder/list',
    method: 'get',
    params: query
  })
}

// 查询房间订单详细
export function getRoomorder(id) {
  return request({
    url: '/system/roomorder/' + id,
    method: 'get'
  })
}
// 根据用户id查询房间订单详细
export function getRoomorderByUserId(userId) {
  return request({
    url: '/system/roomorder/list/' + userId,
    method: 'get'
  })
}

// 新增房间订单
export function addRoomorder(data) {
  return request({
    url: '/system/roomorder',
    method: 'post',
    data: data
  })
}

// 修改房间订单
export function updateRoomorder(data) {
  return request({
    url: '/system/roomorder',
    method: 'put',
    data: data
  })
}
// 修改房间订单
export function updateRoomorderStatusById(id) {
  return request({
    url: '/system/roomorder/status/'+id,
    method: 'put'
  })
}

// 删除房间订单
export function delRoomorder(id) {
  return request({
    url: '/system/roomorder/' + id,
    method: 'delete'
  })
}
